﻿using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Text.Json.Serialization;
namespace BPM.Web.Shared.Data;

/// <summary>
/// 用户登录输出参数
/// </summary>
public partial class LoginOutput : BaseVM
{
    /// <summary>
    /// 主键Id
    /// </summary>
    [DisplayName("业务号")]
    [Required(ErrorMessage = "业务号不能为空")]
    [JsonPropertyName("id")]
    public long Id { get; set; }

    /// <summary>
    /// 账号
    /// </summary>
    [DisplayName("账号")]
    [JsonPropertyName("account")]
    [Required]
    public string? Account { get; set; }

    /// <summary>
    /// 昵称
    /// </summary>
    [DisplayName("昵称")]
    [JsonPropertyName("nickName")]
    public string? NickName { get; set; }

    /// <summary>
    /// 姓名
    /// </summary>
    [DisplayName("姓名")]
    [JsonPropertyName("name")]
    [Required]
    public string? Name { get; set; }

    /// <summary>
    /// 头像
    /// </summary>
    [DisplayName("头像")]
    [JsonPropertyName("avatar")]
    public string? Avatar { get; set; }

    /// <summary>
    /// 生日
    /// </summary>
    [DisplayName("生日")]
    [JsonPropertyName("birthday")]
    [Required]
    public System.DateTimeOffset? Birthday { get; set; }

    /// <summary>
    /// 性别(字典 1男 2女)
    /// </summary>
    [DisplayName("性别(字典 1男 2女)")]
    [JsonPropertyName("sex")]
    [Required]
    public Sex Sex { get; set; }

    /// <summary>
    /// 邮箱
    /// </summary>
    [DisplayName("邮箱")]
    [JsonPropertyName("email")]
    [Required]
    public string? Email { get; set; }

    /// <summary>
    /// 手机
    /// </summary>
    [DisplayName("手机")]
    [JsonPropertyName("phone")]
    [Required]
    public string? Phone { get; set; }

    /// <summary>
    /// 电话
    /// </summary>
    [DisplayName("电话")]
    [JsonPropertyName("tel")]
    public string? Tel { get; set; }

    /// <summary>
    /// 管理员类型（1超级管理员 2管理员 3普通账号）
    /// </summary>
    [DisplayName("管理员类型（1超级管理员 2管理员 3普通账号）")]
    [JsonPropertyName("adminType")]
    public int AdminType { get; set; }

    /// <summary>
    /// 最后登陆IP
    /// </summary>
    [DisplayName("最后登陆IP")]
    [JsonPropertyName("lastLoginIp")]
    public string? LastLoginIp { get; set; }

    /// <summary>
    /// 最后登陆时间
    /// </summary>
    [DisplayName("最后登陆时间")]
    [JsonPropertyName("lastLoginTime")]
    public System.DateTimeOffset? LastLoginTime { get; set; }

    /// <summary>
    /// 最后登陆地址
    /// </summary>
    [DisplayName("最后登陆地址")]
    [JsonPropertyName("lastLoginAddress")]
    public string? LastLoginAddress { get; set; }

    /// <summary>
    /// 最后登陆所用浏览器
    /// </summary>
    [DisplayName("最后登录所用浏览器")]
    [JsonPropertyName("lastLoginBrowser")]
    public string? LastLoginBrowser { get; set; }

    /// <summary>
    /// 最后登陆所用系统
    /// </summary>
    [DisplayName("最后登录所用系统")]
    [JsonPropertyName("lastLoginOs")]
    public string? LastLoginOs { get; set; }

    [JsonPropertyName("loginEmpInfo")]
    public EmpOutput LoginEmpInfo { get; set; } = new();

    /// <summary>
    /// 具备应用信息
    /// </summary>
    [DisplayName("具备应用信息")]
    [JsonPropertyName("apps")]
    public ICollection<AppOutput>? Apps { get; set; }

    /// <summary>
    /// 角色信息
    /// </summary>
    [DisplayName("角色信息")]
    [JsonPropertyName("roles")]
    public ICollection<RoleOutput>? Roles { get; set; }

    /// <summary>
    /// 权限信息
    /// </summary>
    [DisplayName("权限信息")]
    [JsonPropertyName("permissions")]
    public ICollection<string>? Permissions { get; set; }

    /// <summary>
    /// 系统所有权限信息
    /// </summary>
    [DisplayName("系统所有权限信息")]
    [JsonPropertyName("allPermissions")]
    public ICollection<string>? AllPermissions { get; set; }

    /// <summary>
    /// 登录菜单信息---AntDesign版本菜单
    /// </summary>
    [DisplayName("登录菜单信息---AntDesign版本菜单")]
    [JsonPropertyName("menus")]
    public ICollection<AntDesignTreeNode>? Menus { get; set; }

    /// <summary>
    /// 数据范围（机构）信息
    /// </summary>
    [DisplayName("数据范围（机构）信息")]
    [JsonPropertyName("dataScopes")]
    public ICollection<long>? DataScopes { get; set; }

}
